package com.education.auth.client;

import com.education.auth.entity.BusinessDiaryVo;
import com.education.common.pojo.SysUserOther;
import com.education.common.utils.ApiReturnObject;
import com.education.user.api.UserApi;
import com.education.user.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author: ly
 * @create: 2018-07-07 18:09
 **/
@FeignClient("user-service")
public interface UserClient extends UserApi {

    /**
     * 引入查询老师接口
     * @return 学生入学信息 /api/auth/accredit
     */
    @GetMapping("queryList")
    ApiReturnObject queryMenuListByUserId(@RequestParam("id") Integer id);

    /**
     * 查询用户详情
     * @return
     */
    @GetMapping("/k12main/sysUser/selectOnePCF")
    SysUserOther selectOneById(@RequestParam("id") Integer id);

    /**
     * 根据用户手机号查询用户信息
     * @param userPhone
     * @return
     */
    @GetMapping("/k12main/sysUser/queryUserByUserPhone")
    SysUserOther queryUserByUserPhone(@RequestParam("userPhone") String userPhone);

    /**
     * 日志操作新增
     * @param businessDiaryVo
     * @return
     */
    @PostMapping("/businessDiary/diaryAdd")
    int diaryAdd(@RequestBody BusinessDiaryVo businessDiaryVo);


    @GetMapping("/businessDiary/extisUser")
    boolean extisUser( @RequestParam("sysPhone")String sysPhone);


    @PostMapping("/businessDiary/satisfyLogin")
    boolean satisfyLogin(@RequestBody User user);


}
